import { IFeidaoAiBrowserComponent } from '@feidao/web/interfaces';
import show from '../atom/show';
import hide from '../atom/hide';
import fire_component_msg from '@feidao/web/atom/browser/fsm/fire-component-msg';

export default async function a002(fd: IFeidaoAiBrowserComponent, ...args: any[]) {
	//  保存
	const f = fd.data.node.querySelector<HTMLFormElement>('#recruit_plan_form');    
	const work_plan = f.work_plan.value;     //计划名称
	const start_time = f.start_time.value;    //开始时间  
	const finish_time = f.finish_time.value;      //结束时间
	const cost = f.cost.value;      //预算费用
	const hir_nop = f.hir_nop.value;      //招聘人数
	const accessory_url = f.accessory_url.value;      //附件      
	//fire_component_msg('zj-common-002', 'ec-001', 'success', '请选择员工');  
	if (!work_plan) {        
		fire_component_msg('zj-common-002', 'ec-001', 'fail', '请填写计划名称');       
	} 
	if (!start_time) {        
		fire_component_msg('zj-common-002', 'ec-001', 'fail', '请填写开始时间');       
	} 
	if (!finish_time) {        
		fire_component_msg('zj-common-002', 'ec-001', 'fail', '请填写结束时间');       
	} 
	if (!hir_nop) {        
		fire_component_msg('zj-common-002', 'ec-001', 'fail', '请填写招聘人数');       
	} 
    //const name = fd.data.node.querySelector<HTMLInputElement>('[data-feidao-id="name"]').value;
}
